﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sealight.Core.DataAdapter;
namespace Sealight.Core.Domain
{
   public class TopicLocalizedEntity
    {
       public virtual Guid TopicLocalizedID { get; set; }
       public virtual string Title { get; set; }
       public virtual string Description { get; set; }
       public virtual string Body { get; set; }
       public virtual DateTime CreatedDate { get; set; }
       public virtual DateTime UpdatedDate { get; set; }

       public virtual LanguageEntity Language { get; set; }
       public virtual TopicEntity Topic { get; set; }

       public virtual topic_localized ToDataAdapter()
       {
           topic_localized entity = new topic_localized
           {
               body = this.Body,
               description = this.Description,
               title = this.Title,
               id = this.TopicLocalizedID,
               created_date = this.CreatedDate,
              
               updated_date = this.UpdatedDate
           };

           if (this.Language != null)
           {
               entity.language = this.Language.ToDataAdapter();
           }

           return entity;
       }
    }
}
